/*
 * color.h
 *
 *  Created on: Oct 1, 2011
 *      Author: gustavo
 */

#ifndef COLOR_H_
#define COLOR_H_

#ifdef	__cplusplus
extern "C" {
#endif

typedef struct _color {
	union {
		int px;
		struct {
			unsigned char r;
			unsigned char g;
			unsigned char b;
			//unsigned char alpha;
		} rgb;
		unsigned char gray;
	};
} Color;

Color imp_color(unsigned char R, unsigned char G, unsigned char B);
Color imp_color_gray(unsigned char gray);
Color imp_color_rgb_palette(int cor, int div);

#ifdef	__cplusplus
}
#endif

#endif /* COLOR_H_ */
